<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
         
    
    
    <ui:composition template="../template/template.xhtml">

        
        <ui:define name="title">
            <h:outputText value="#{bundle.EditDatosTitle}"></h:outputText>
        </ui:define>

        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>

            <h:form>
                <h:panelGrid columns="2">
                   
                    <h:outputLabel value="#{bundle.EditDatosLabel_cedula}" for="cedula" />

                    <h:inputText id="cedula" value="#{datosController.selected.cedula}" title="#{bundle.EditDatosTitle_cedula}" required="true" requiredMessage="#{bundle.EditDatosRequiredMessage_cedula}" readonly="true"/>

                    <h:outputLabel value="#{bundle.EditDatosLabel_nombre}" for="nombre" />
                    <h:inputText id="nombre" value="#{datosController.selected.nombre}" title="#{bundle.EditDatosTitle_nombre}" />

                    <h:outputLabel value="#{bundle.EditDatosLabel_foto}" for="foto" />

                    <img src="/imagenget/faces/BuscarIMG?cedula=#{datosController.selected.cedula}" width="150" height="140"></img>
                            


                </h:panelGrid>

                <h:commandLink action="#{datosController.update}" value="#{bundle.EditDatosSaveLink}"/>

                <br />
                <br />
                
                <h:link outcome="View" value="#{bundle.EditDatosViewLink}"/>
               
                <br />
               
                <h:commandLink action="#{datosController.prepareList}" value="#{bundle.EditDatosShowAllLink}" immediate="true"/>
               
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditDatosIndexLink}" />
                
            </h:form>
            
             <form method="POST" enctype="multipart/form-data" action="/imagenget/faces/FileUploadServer">
                    <table border="1">
                        <tr><td>Cedula</td>
                            <td><input type="text" value="#{datosController.selected.cedula}" name="cedula"/></td></tr>

                        <tr><td>Nombre</td>
                            <td><input type="text" value="" name="nombre"/></td></tr>

                        <tr><td>Archivo</td>
                            <td>
                                <input type="file" name="file"/></td></tr>
                                

                        <tr><td>Ingresar</td>
                            <td><input type="submit" value="Press"/></td></tr>

                    </table>
                </form>
            
            
            
        </ui:define>
    </ui:composition>

</html>
